package k2_oop.p2_inheritAndPolymorphic.demo05;

public class testDemo5 {
    public static void main(String[] args) {

        Car car = new Car(5,"white",1.3,80,true,false);

        if (car.isOpenAirConditioner()) {
            System.out.println("空调已开");
        }else{
            System.out.println("未开空调");
        }

        if(car.isHasCD()){
            System.out.println("我的车比较古老，还是CD播放机呢");
        }else{
            System.out.println("我的车没有CD播放机");
        }

        car.speedUp(30);
        System.out.println(car.getSpeed());

        car.speedDown(100);
        System.out.println(car.getSpeed());

        car.stop();
        System.out.println(car.getSpeed());

        System.out.println(car.getTyreCount());
        System.out.println(car.getColor());
        System.out.println(car.getWeight());

    }
}
